<?php
namespace common\models\game;

use Yii;

/**
 * This is the model class for table "data_ty_diamond_setting".
 *
 * @property string $auto_id
 * @property string $game_type
 * @property string $room_type
 * @property integer $is_open
 * @property integer $play_limit_time
 * @property integer $machine_first_reward_min_play_count
 * @property integer $machine_first_reward_max_play_count
 * @property integer $machine_diamond_one
 * @property double $machine_diamond_one_percent
 * @property integer $machine_diamond_two
 * @property double $machine_diamond_two_percent
 * @property integer $machine_diamond_three
 * @property double $machine_diamond_three_percent
 * @property integer $machine_diamond_min_play_count
 * @property integer $machine_diamond_max_play_count
 * @property integer $room_diamond_one
 * @property integer $room_diamond_one_play_count
 * @property integer $room_diamond_two
 * @property integer $room_diamond_two_play_count
 */
class DataTyDiamondSetting extends \backend\models\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'data_ty_diamond_setting';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('game_db');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['is_open', 'play_limit_time', 'machine_first_reward_min_play_count', 'machine_first_reward_max_play_count', 'machine_diamond_one', 'machine_diamond_two', 'machine_diamond_three', 'machine_diamond_min_play_count', 'machine_diamond_max_play_count', 'room_diamond_one', 'room_diamond_one_play_count', 'room_diamond_two', 'room_diamond_two_play_count'], 'integer'],
            [['machine_diamond_one_percent', 'machine_diamond_two_percent', 'machine_diamond_three_percent'], 'number'],
            [['game_type', 'room_type'], 'string', 'max' => 50]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'auto_id' => 'ID主键',
            'game_type' => '游戏类型',
            'room_type' => '房间类型',
            'is_open' => '是否开启（0-关，1-开）',
            'play_limit_time' => '体验场体验限时（秒）',
            'machine_first_reward_min_play_count' => '体验场首次最小局数',
            'machine_first_reward_max_play_count' => '体验场首次最大局数',
            'machine_diamond_one' => '机台送钻1',
            'machine_diamond_one_percent' => '机台送钻1概率',
            'machine_diamond_two' => '机台送钻2',
            'machine_diamond_two_percent' => '机台送钻2概率',
            'machine_diamond_three' => '机台送钻3',
            'machine_diamond_three_percent' => '机台送钻3概率',
            'machine_diamond_min_play_count' => '机台送钻出奖局数最小值',
            'machine_diamond_max_play_count' => '机台送钻出奖局数最大值',
            'room_diamond_one' => '房间送钻1',
            'room_diamond_one_play_count' => '房间送钻1局数',
            'room_diamond_two' => '房间送钻2',
            'room_diamond_two_play_count' => '房间送钻2局数',
        ];
    }

  /**
     * 返回数据库字段信息，仅在生成CRUD时使用，如不需要生成CRUD，请注释或删除该getTableColumnInfo()代码
     * COLUMN_COMMENT可用key如下:
     * label - 显示的label
     * inputType 控件类型, 暂时只支持text,hidden  // select,checkbox,radio,file,password,
     * isEdit   是否允许编辑，如果允许编辑将在添加和修改时输入
     * isSearch 是否允许搜索
     * isDisplay 是否在列表中显示
     * isOrder 是否排序
     * udc - udc code，inputtype为select,checkbox,radio三个值时用到。
     * 特别字段：
     * id：主键。必须含有主键，统一都是id
     * create_date: 创建时间。生成的代码自动赋值
     * update_date: 修改时间。生成的代码自动赋值
     */
    public function getTableColumnInfo(){
        return array(
        'auto_id' => array(
                        'name' => 'auto_id',
                        'allowNull' => false,
//                         'autoIncrement' => true,
//                         'comment' => 'ID主键',
//                         'dbType' => "bigint(20)",
                        'defaultValue' => '',
                        'enumValues' => null,
                        'isPrimaryKey' => true,
                        'phpType' => 'string',
                        'precision' => '20',
                        'scale' => '',
                        'size' => '20',
                        'type' => 'bigint',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('auto_id'),
                        'inputType' => 'hidden',
                        'isEdit' => true,
                        'isSearch' => true,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'game_type' => array(
                        'name' => 'game_type',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '游戏类型',
//                         'dbType' => "varchar(50)",
                        'defaultValue' => '',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'string',
                        'precision' => '50',
                        'scale' => '',
                        'size' => '50',
                        'type' => 'string',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('game_type'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'room_type' => array(
                        'name' => 'room_type',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '房间类型',
//                         'dbType' => "varchar(50)",
                        'defaultValue' => '',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'string',
                        'precision' => '50',
                        'scale' => '',
                        'size' => '50',
                        'type' => 'string',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('room_type'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'is_open' => array(
                        'name' => 'is_open',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '是否开启（0-关，1-开）',
//                         'dbType' => "tinyint(1)",
                        'defaultValue' => '0',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '1',
                        'scale' => '',
                        'size' => '1',
                        'type' => 'smallint',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('is_open'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'play_limit_time' => array(
                        'name' => 'play_limit_time',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '体验场体验限时（秒）',
//                         'dbType' => "int(11)",
                        'defaultValue' => '0',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('play_limit_time'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'machine_first_reward_min_play_count' => array(
                        'name' => 'machine_first_reward_min_play_count',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '体验场首次最小局数',
//                         'dbType' => "int(11)",
                        'defaultValue' => '0',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('machine_first_reward_min_play_count'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'machine_first_reward_max_play_count' => array(
                        'name' => 'machine_first_reward_max_play_count',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '体验场首次最大局数',
//                         'dbType' => "int(11)",
                        'defaultValue' => '0',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('machine_first_reward_max_play_count'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'machine_diamond_one' => array(
                        'name' => 'machine_diamond_one',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '机台送钻1',
//                         'dbType' => "int(11)",
                        'defaultValue' => '3',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('machine_diamond_one'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'machine_diamond_one_percent' => array(
                        'name' => 'machine_diamond_one_percent',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '机台送钻1概率',
//                         'dbType' => "double",
                        'defaultValue' => '0.5',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'double',
                        'precision' => '',
                        'scale' => '',
                        'size' => '',
                        'type' => 'double',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('machine_diamond_one_percent'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'machine_diamond_two' => array(
                        'name' => 'machine_diamond_two',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '机台送钻2',
//                         'dbType' => "int(11)",
                        'defaultValue' => '6',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('machine_diamond_two'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'machine_diamond_two_percent' => array(
                        'name' => 'machine_diamond_two_percent',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '机台送钻2概率',
//                         'dbType' => "double",
                        'defaultValue' => '0.3',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'double',
                        'precision' => '',
                        'scale' => '',
                        'size' => '',
                        'type' => 'double',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('machine_diamond_two_percent'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'machine_diamond_three' => array(
                        'name' => 'machine_diamond_three',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '机台送钻3',
//                         'dbType' => "int(11)",
                        'defaultValue' => '9',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('machine_diamond_three'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'machine_diamond_three_percent' => array(
                        'name' => 'machine_diamond_three_percent',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '机台送钻3概率',
//                         'dbType' => "double",
                        'defaultValue' => '0.2',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'double',
                        'precision' => '',
                        'scale' => '',
                        'size' => '',
                        'type' => 'double',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('machine_diamond_three_percent'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'machine_diamond_min_play_count' => array(
                        'name' => 'machine_diamond_min_play_count',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '机台送钻出奖局数最小值',
//                         'dbType' => "int(11)",
                        'defaultValue' => '300',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('machine_diamond_min_play_count'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'machine_diamond_max_play_count' => array(
                        'name' => 'machine_diamond_max_play_count',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '机台送钻出奖局数最大值',
//                         'dbType' => "int(11)",
                        'defaultValue' => '500',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('machine_diamond_max_play_count'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'room_diamond_one' => array(
                        'name' => 'room_diamond_one',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '房间送钻1',
//                         'dbType' => "int(11)",
                        'defaultValue' => '18',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('room_diamond_one'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'room_diamond_one_play_count' => array(
                        'name' => 'room_diamond_one_play_count',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '房间送钻1局数',
//                         'dbType' => "int(11)",
                        'defaultValue' => '1800',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('room_diamond_one_play_count'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'room_diamond_two' => array(
                        'name' => 'room_diamond_two',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '房间送钻2',
//                         'dbType' => "int(11)",
                        'defaultValue' => '28',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('room_diamond_two'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		'room_diamond_two_play_count' => array(
                        'name' => 'room_diamond_two_play_count',
                        'allowNull' => true,
//                         'autoIncrement' => false,
//                         'comment' => '房间送钻2局数',
//                         'dbType' => "int(11)",
                        'defaultValue' => '2800',
                        'enumValues' => null,
                        'isPrimaryKey' => false,
                        'phpType' => 'integer',
                        'precision' => '11',
                        'scale' => '',
                        'size' => '11',
                        'type' => 'integer',
                        'unsigned' => false,
                        'label'=>$this->getAttributeLabel('room_diamond_two_play_count'),
                        'inputType' => 'text',
                        'isEdit' => true,
                        'isSearch' => false,
                        'isDisplay' => true,
                        'isSort' => true,
//                         'udc'=>'',
                    ),
		        );
        
    }
 
}
